package chenji.itemeditor.util;

import org.bukkit.inventory.ItemStack;

import chenji.itemeditor.ItemEditorAPI;
import chenji.itemeditor.nbt.base.NBTTagCompound;

public abstract class NMSItem {
	public static NMSItem getItem(ItemStack item) {
		try {
			return ((NMSItem) ItemEditorAPI.getInstance().getASMToolManager().getNMSItemToolClass().newInstance()).loadBukkitItem(item);
		} catch (InstantiationException | IllegalAccessException e) {
			e.printStackTrace();
		}
		return null;
	}

	public abstract NMSItem loadBukkitItem(ItemStack item);

	public abstract ItemStack getBukkitItem();

	public abstract Object getNMSTag();

	public abstract NMSItem setTag(Object nbttagcompound);

	public abstract Object getNMSItem();

	public abstract NMSItem setTag(NBTTagCompound nbttagcompound);

	public abstract NBTTagCompound getTag();

	public abstract NMSItem setCount(int count);

	public abstract NMSItem setData(int data);

	public abstract NMSItem setRepairCost(int i);

}
